package com.yunhe.assist.client;

import com.yunhe.assist.client.fallback.FirmClientFallbackFactory;
import com.yunhe.assist.config.FeignConfig;
import com.yunhe.common.model.ResultObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @ClassName AuthorityClient
 * @Description TODO
 * @Author HeTao
 * @Date 2021/11/9 16:22
 * @Version 1.0
 **/
@ApiIgnore
@FeignClient(value = "yh-authority", fallbackFactory = FirmClientFallbackFactory.class,configuration = FeignConfig.class)
@Component
public interface FirmClient {

    @RequestMapping(value = "/firms/byStation", method = RequestMethod.GET)
    ResponseEntity<ResultObject> findFirmByStationId(@RequestParam(value = "stationId") Long stationId);

}
